package wowraidmanager.client.auction.data.canvas;

import java.util.ArrayList;

import wowraidmanager.shared.model.auction.canvas.TooltipData;

import com.google.gwt.canvas.client.Canvas;
import com.google.gwt.canvas.dom.client.Context2d;
import com.google.gwt.canvas.dom.client.CssColor;
import com.google.gwt.canvas.dom.client.Context2d.TextAlign;

public class BaseDrawCanvas{

    Context2d dataContext;

    final CssColor allianceAverageColor = CssColor.make("rgba(102, 51, 255, 1)");
    final CssColor allianceMinimumColor = CssColor.make("rgba(51, 102, 255, 1)");
    final CssColor hordeAverageColor = CssColor.make("rgba(255, 102, 51, 1)");
    final CssColor hordeMinimumColor = CssColor.make("rgba(255, 51, 102, 1)");
    final CssColor neutralAverageColor = CssColor.make("rgba(51, 255, 153, 1)");
    final CssColor neutralMinimumColor = CssColor.make("rgba(153, 255, 51, 1)");
    final CssColor textColor = CssColor.make("rgba(51, 51, 51, 1)");
    final CssColor backGroundColor = CssColor.make("rgba(255, 255, 255, 1)");

    ArrayList<TooltipData> tooltipDataList;

    public BaseDrawCanvas(Canvas dataCanvas){
        this.dataContext = dataCanvas.getContext2d();
    }

    protected void setClear(){
        dataContext.setFillStyle(backGroundColor);
        dataContext.beginPath();
        dataContext.fillRect(0, 0, 400, 300);

        dataContext.setFillStyle(textColor);
        dataContext.setFont("20px 'Helvetica'");
        dataContext.setTextAlign(TextAlign.LEFT);
        dataContext.fillText("Data None", 20, 20);
    }
}
